package org.brownflat.lighthouse.ci;

import java.util.Comparator;
import java.util.Date;


public class BuildComparator implements Comparator<Build> {
	
	private Comparator<Date> dateComparator;

	public BuildComparator(Comparator<Date> dateComparator) {
		this.dateComparator = dateComparator;
	}

	@Override
	public int compare(Build buildOne, Build buildTwo) {
		return dateComparator.compare(buildOne.getDate(), buildTwo.getDate());
	}
}
